// 定义变量
const KEY = 'hendlines'

// 1.存储token
export const setToken = (token) => {
  localStorage.setItem(KEY, token)
}
// 2.获取token
export const getToken = () => {
  return localStorage.getItem(KEY)
}

// 3.删除token
export const delToken = () => {
  localStorage.removeItem(KEY)
}

export const setItem = (key, data) => {
  localStorage.setItem(key, data)
}

export const getItem = (key) => {
  return localStorage.getItem(key)
}
